package com.pw.study.arithmetic

import scala.io.{BufferedSource, Source}

/**
 * @Desc: 算法测试
 * @author: future
 * @since: 2022/5/22-9:43
 */
object Hello {
  def main(args: Array[String]): Unit = {
    val line = "python,java,hello,future,hadoop,china"
    println("使用字符串来替换：" + line.replace("china", "中国"))

    val source: BufferedSource = Source.fromFile("data/file/sc.txt")
    val lines: Iterator[String] = source.getLines()
    while (lines.hasNext) {
      val line: String = lines.next()
      println(line)
    }
  }
}
